'''
Descripttion: 
version: 
Author: douye
Date: 2022-04-11 16:35:57
LastEditors: douye
LastEditTime: 2022-04-11 16:39:12
'''
"""parking_space_sharing URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/4.0/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  path('', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from app01 import views
from django.urls import path, re_path

urlpatterns = [
    path('admin/', admin.site.urls),
    re_path(r'^login/$', views.User.as_view()),
    re_path(r'^register/$', views.User.as_view()),

    re_path(r'^hire_space/$', views.Rent.as_view()),
    re_path(r'^search_space/$', views.Rent.as_view()),
    re_path(r'^del_order/$', views.Rent.as_view()),
    # 租车人

    re_path(r'^lease/$', views.Lease.as_view()),
    re_path(r'^del_space/$', views.Lease.as_view()),
    # 出租人

    re_path(r'^get_code/$', views.CodeNumber.as_view()),
    re_path(r'^flush_code/$', views.CodeNumber.as_view()),
    # 二维码编号刷新

    re_path(r'^get_device/$', views.Device.as_view()),
    re_path(r'^add_device/$', views.Device.as_view()),
    re_path(r'^del_device/$', views.Device.as_view()),
    re_path(r'^device_type/$', views.DeviceType.as_view()),
    # 设备相关

    re_path(r'^all_orders/$', views.Order.as_view()),
    re_path(r'^get_order/$', views.Order.as_view()),

    re_path(r'^get_user/$', views.GetUser.as_view()),


]
